-- GENERATED SPELL FOR [Amani'shi Warbringer] --


function spell0_23580(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(43273,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23580', 571, 1)
end

function spell1_23580(pUnit, Event) --@Dismount Bear,n/a--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(43274,pUnit:GetMainTank ())
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_23580', 1, 1)
end

function spell2_23580(pUnit, Event) --@Frenzy,Self--
pUnit:FullCastSpellOnTarget(40743,pUnit)
pUnit:RegisterEvent('Sorts_23580', 30252, 1)
end

function spell3_23580(pUnit, Event) --@Furious Roar,Self--
pUnit:FullCastSpellOnTarget(42496,pUnit)
pUnit:RegisterEvent('Sorts_23580', 10320, 1)
end

function Sorts_23580(pUnit, Event)
local choix_sorts_23580 = math.random(0, 3)
if choix_sorts_23580 == 0 then
pUnit:RegisterEvent('spell0_23580', 1, 1)
end
if choix_sorts_23580 == 1 then
pUnit:RegisterEvent('spell1_23580', 1, 1)
end
if choix_sorts_23580 == 2 then
pUnit:RegisterEvent('spell2_23580', 1, 1)
end
if choix_sorts_23580 == 3 then
pUnit:RegisterEvent('spell3_23580', 1, 1)
end
end

function mob23580_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_23580', math.random(1500, 3000), 1)
end

function mob23580_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23580_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23580_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(23580, 1, 'mob23580_Action')
RegisterUnitEvent(23580, 2, 'mob23580_Leave')
RegisterUnitEvent(23580, 3, 'mob23580_Kill')
RegisterUnitEvent(23580, 4, 'mob23580_Die')
